In a relatively large numerical control (NC) machine tool such as a gate-shaped machining center, a ram is provided for holding a spindle in a rotatable manner, and an attachment is detachably mounted on a front end of the ram. The attachment has a rotatable shaft extending in a direction different from the spindle, such as a direction perpendicular to the spindle, and a tool is mounted on the rotatable shaft to thereby work a plurality of surfaces of a workpiece.
In order to work the various surfaces of the workpiece, it is necessary to change, i.e., index, the mounting position of the attachment with respect to the ram. The attachment is ordinarily mounted on the ram through an angular position determining mechanism such as a gear coupling. When an attachment indexing procedure is carried out, the attachment is moved forward together with the spindle to thereby disengage the gearing of the gear coupling then rotated by a predetermined angle and again engaged with the gear coupling.
In the prior art, such indexing rotation has been performed only in one direction such as in a clockwise direction or in a counterclockwise direction (for example, refer to Japanese Patent Laid-open (KOKAI) No. 34251/1985). Accordingly, in the case of a large angle of indexing rotation, much time is required for the indexing procedure, causing a lowering of the working efficiency.
Furthermore, at the time of indexing the attachment, backlash of the gears or torsion of the shaft is applied as an error, which results in an adverse reengagement of the gear coupling.
In an NC machine tool, when an automatic operation is interrupted for a reason such as breakage of the tool and the operation program is again started after repairing of the tool, it is necessary to obtain coincidence between the indexing position of the attachment on the program with the present indexing position thereof actually mounted on the machine tool and then to execute a re-starting of the program, for preventing interference between the attachment and the workpiece.
In the prior art, this obtaining of coincidence between the indexing position of the attachment on the program and the present indexing position thereof actually mounted on the machine tool is performed under the observation and confirmation of an operator, and the angular positioning of the attachment is carried out by a manual operation.
This method, however, involves a problem in that there is a possibility of the operator restarting the program without being aware of a deviation between these indexing positions, and, in such a case, the attachment and the workpiece will undergo mutual interference, thereby resulting in damage or breakage of the attachment or the workpiece.